package com.liu.domain.service.search;

import com.liu.domain.base.PageVo;
import com.liu.domain.entity.search.SearchMappingModel;
import com.liu.domain.vo.search.SearchRequestVO;
import org.apache.poi.ss.formula.functions.PPMT;
import org.springframework.data.domain.Pageable;
import org.springframework.data.web.PageableDefault;

import java.util.List;

/**
 * @author liuxinghong
 * @Description: elasticsearch 搜索服务service
 * @date 2019/8/3/0038:54
 */
public interface SearchMappingModelService {

    /**
     * 保存数据文档到索引库
     * @param list<SearchMappingModel>
     * @return
     */
    List<SearchMappingModel> save(List<SearchMappingModel> list);

    /**
     * 精准匹配分页，不采用ik分词器进行匹配
     * @param vo
     * @return
     */
    List<SearchMappingModel> searchPrecise(PageVo<SearchRequestVO> vo);

    /**
     * 匹配查询分页，采用ik分词器进行匹配
     * @param
     * @return
     */
    List<SearchMappingModel> searchMatch(PageVo<SearchRequestVO> vo);
    /**
     * 精准匹配不分页，不采用ik分词器进行匹配
     * @param vo
     * @return
     */
    List<SearchMappingModel> precise(SearchRequestVO vo);

    /**
     * 匹配查询不分页，采用ik分词器进行匹配
     * @param
     * @return
     */
    List<SearchMappingModel> match(SearchRequestVO vo);

    /**
     * 查询数据详情
     * @param id
     * @return
     */
    SearchMappingModel detail(String id);

    /**
     * 删除索引数据
     * @param id
     * @return
     */
    void delete(String id);


}
